home *** CD-ROM | disk | FTP | other *** search
- @device<file>
- @make<Manual>
-
- @comment<the following only for output to a file:>
- @Style(leftmargin 0.2 inch, rightmargin 0.2 inch)
-
- @Style(PaperLength 11 inches,Paperwidth 8.2 inches)
- @Style(topmargin 1.1 inch, bottommargin 1.3 inch)>
- @Style(spacing 1.2 )
- @Style(Indentation 5)
- @pageheading(left "MAX 1.01", right "- @value(page) -")
-
- @begin(TitlePage)
- @begin(TitleBox)
- @MajorHeading(MAX)
- @Heading(Reference Manual)
- @Subheading(PRELIMINARY VERSION)
-
- Ivo Welch
-
- @end(TitleBox)
- @Skip(2)
- @begin(Heading)
- New York, Schweinfurt
- @end(Heading)
- @value(Date)
-
- @skip<3>
- @CopyrightNotice(I. Welch)
- @end(TitlePage)
-
- @section<An Example>
-
- Here is an example how to use MAX. It is only at this point in the
- documentation, so that you can satisfy your initial curiousity and
- play-drive. If you are not yet burning to try out everything, but you
- would rather learn something while playing, run the Tutorial ( see
- section @b<TUTORIAL>. ) instead. Do not be disturbed if you don't
- understand everything that is going on. Just follow the instructions
- and look at the action on the screen.
-
- You type everything that is in bold-face. Explanations are provided in
- Italics. @b<@index[CTL-F]CTL-F> means: hold down the @i<CTRL> key and
- press simultaneously the @i<F> key; @b<@index[ESC-F]ESC-F> means:
- first press the @i<ESC> key, then press the @b<F> key.
-
- @i<You start this example by typing @b<MAX \MAX\DOC\MAX.HLP> at the DOS prompt.> @index[DOS]
-
- A>@b<MAX \MAX\DOC\MAX.HLP>
-
- @i<You have just asked MAX to edit its own HELP file ( which can be in
- the connected or in the \max\doc directory ). You will not only see
- normal characters, but a few control-characters interspersed in your
- file, recognisable by a light @b<^> followed by another character.>
-
- @b<@index[CTL-F]CTL-F @index[CTL-F]CTL-F @index[CTL-F]CTL-F>
-
- @i<Now the cursor has moved three characters to the right>
-
- @b<@index[CTL-B]CTL-B @index[CTL-B]CTL-B>
-
- @i<And it has moved back two characters>
-
- @b<@index[CTL-P]CTL-P>
-
- @i<You have just made a mistake, trying to retreat a line when the
- cursor was already on the first line. MAX has detected your error,
- and notifies you with a beep and a message that you can see for a few
- seconds below the modeline.> @index[Error Messages] @index[Messages]
-
- @b<@index[CTL-N]CTL-N>
-
- @i<Now you have advanced one line>
-
- @b<@index[CTL-P]CTL-P>
-
- @i<Now you can retreat a line, sine you are not on line 1 anymore>
-
- @b<@index[CTL-D]CTL-D>
-
- @i<You have just deleted a character>
-
- @b<@index[CTL-X CTL-B]CTL-X CTL-B>
-
- @i<You have asked MAX to allow you to choose a new buffer
- @index[Buffers] ( you want to stop changing this document, and start
- changing another document without loosing your changes on the first
- document ). MAX displays you a small menu of available choices>
-
- @b[<RETURN>]
-
- @i<You prefer to continue editing your original document. A number
- would have chosen a new work place for editing another file.>
-
- @b[<@index[CTL-X 2]CTL-X 2>]
-
- @i<You have entered "2 window mode." This allows you to edit your
- file, while looking at another, and switching easily back and forth
- between editing files>
-
- @b[<@index[CTL-X 1]CTL-X 1>]
-
- @i<But you are not too interested at this for now. You would rather
- get some help. Hold all of the following three keys: <SHIFT> <CTRL>
- and Underline "_"> @index[HELP]
-
- @b[@index[CTL-_]CTL-_]
-
- @i<You are now looking at the help menu. If you want, hit "1" to get
- menu item 1. Then you want to get out of the HELP menu, so you type
- the universal abort character...> @index[Aborting] @index[QUIT]
-
- @b[@index[CTL-G]CTL-G]
-
- @i<You are tired and decide to stop this for the time being, so you
- decide to exit>
-
- @b[@index[CTL-X CTL-Z]CTL-X CTL-Z @index[CTL-Y]CTL-Y]
-
- Now you have seen how to interact with this strange computer program.
- Your curiosity will now have to be satisfied now by learning
- systematically useful commands.
-
- @Chapter<How to get started>
-
- @Section<Backing up the Diskette>
-
- You can back up MAX just like you would back up any other diskette:
-
- Run the program named DISKCOPY from your DOS diskette, then insert MAX
- into one drive and a blank diskette into the other, and tell DISKCOPY
- that you wish to copy from MAX's drive to the blank diskette's drive.
- Make sure to always keep a backup copy of MAX in a safe place for your
- own rotection against program errors, your errors, or simply magnetic
- media wearout.
-
- @Section<The Use of this Manual>
-
- This manual serves not only two programs, but also two purposes.
- Purpose One is to tell you how to go about learning how to use all
- these new things: the editor, the manual, the documentation etc.
- Purpose Two is to serve you as a reference manual, to allow you to
- explore new commands and to look up forgotten commands.
-
- Hence, you will find a logical gap in this manual. You should overcome
- it by playing and experimenting with MAX on-line. A built-in help
- facility should help you to overcome problems on-line. @index[HELP]
-
- As a final note, if you have acess to EMACS @index[EMACS] (MIT), or
- any EMACS clone (like Epsilon [trademark of Lugaro Software] or MINCE
- [trademark of Mark of the Unicorn]), you may also find many valuable
- hints how to use EMACS-style @index[EMACS Clones] editors in general.
-
- @Chapter<Learning how to use the Editor>
-
- @Section<The Keyboard>
-
- MAX's allows you to use two different kinds of inputs:
- Menu/Functionkey Input, and Direct Sequences Input.
-
- @Subsection<Menus and Functionkeys>
-
- @index[Menus] Menu-style has the advantage of being trivial to learn
- and trivial to use, but it depends heavily on the computer that you
- are using - and on MAX itself. Other @index[EMACS Clones] EMACS-like
- editors will not have this menu system. Furthermore, menus force you
- to go through several menu's even if you already know what you want to
- do. Therefore it usually takes more time to edit with menus than with
- control-functions.
-
- MAX uses IBM's non-alphanumeric keys to allow you to input commands.
- Some of the keys, like Home or Arrows always do what you would expect
- them to do, namely moving the cursor to another location. Try these
- keys ( they are on the numeric keypad ).
-
- The functionkeys on the left side of the main keyboard can change
- meaning. The last line on the screen displays the actual function of
- the functionkeys at any moment, and a brief description of which menu
- is currently active.@index[Last Line on Screen] You can switch from
- one menu to another by hitting the appropriate functionkey. A new menu
- will appear prompting you for different options. F10 in the original
- menu will turn off the last line (but still allow you to see the name
- of the menu). Using menus is so trivial, that talking about it will
- only add complications - try them out.
-
- @Subsection<Keystroke Sequence Input>
-
- Control-style has the advantage that once you know one EMACS clone,
- @index[EMACS Clones] you can use all others. You will also be able to
- work faster, since you command the editor directly, and don't have to
- go through many menus over and over again. I strongly recommend
- learning and using this method. @index[menus]
-
- Every function that your editor can perform for you corrosponds to a
- specific keystroke sequence. You will have to memorize them, which
- may give you some initial problems. Some of the commands have
- "mnemonic" keystroke sequences: they shall remind you of what they
- actually do. For instance, @index[CTL-@b<F>]CTL-@b<F> moves the
- cursor @b<F>orward, @index[CTL-@b<B>]CTL-@b<B> moves it @b<B>ackwards.
- Unfortunately, since EMACS @index[EMACS] has grown slowly over time,
- many keystroke sequences are just convention, and bear no relationship
- to their actual meaning.
-
- There are essentially two types of keystroke sequences: Control and
- Escape Sequences. The main difference is that control sequences
- require you to hold down the control key and at the same time pressing
- another key ( denotated as @b<@index[CTL-*]CTL-*>, where * is the name
- of the other key ), while Escape Sequences require you to first press
- <ESCAPE> and after that another key ( denotated as
- @b<@index[ESC-*]ESC-*> ).
-
- You can look up the keystroke sequence of any function, or the
- function of any keystroke sequence either on-line in your editor's
- help menu, or in this manual. @index[HELP] @index[Menus]
-
- @Section<HELP and QUIT>
-
- There are two functions that you should always remember:
-
- @b<@index[CTL-_]CTL-_>, that is holding down simultaneously <SHIFT>,
- <CTRL> and <UNDERLINE> ( _ ), will enter the HELP menu. Here you can
- choose what you need to know. @index[HELP]
-
- @b<@index[CTL-G]CTL-G> will quit whatever you are doing and whereever
- you are. It will return you to the basic editing mode ( from which you
- can of course get help, exit etc ). @index[Aborting] @index[QUIT]
-
- @b<Always remember these special functions !>
-
- @Section<The Tutorial>
-
- The time has come to start the tutorial. Type A>MAX TUTORIAL.HLP,
- carefully read every page, and follow the instructions.
-
- If you get confused, or you think you have done something wrong, type
- @b<@index[CTL-X CTL-Z]CTL-X CTL-Z @index[CTL-Y]CTL-Y> and start all
- over again.
-
- Once you have finished with the tutorial, you should be able to use
- MAX without any problems for your most basic needs. Work with the
- commands you know at this point for about a week (until you remember
- the basic keystroke sequences without looking at any reference
- anymore).
-
- Once you know all the basic functions by heart, strive through this
- manual, try out new commands, and see what they do. Preferably do this
- only on files that you don't really need, since playing with unknown
- commands gives you a good chance of erasing or modifying work
- accidentally.
-
- @Chapter<MAX Command Reference>
-
- @Section<Modes>
-
- @Subsection<Subject Modes>
-
- @Paragraph<TEXT Mode>
-
- This is the default mode. All Text Mode means is that TAB stops are
- set every 8 characters, and that hitting TAB will simply place you at
- the next such stop.
-
- @Paragraph<Wrap Mode>
-
- Wrap Mode can be toggled with @i<@index[ESC-X W]ESC-X W>. When you are
- in Wrap mode, and you press <CR>, starting a new line, MAX will
- automatically fill the paragraph for you.@index[Fill Mode]
- @index[Paragraph] This is useful when you want to type a lot of text
- without even looking at the screen, and worrying about hitting <CR> at
- the right time. When you finish your paragraph, you just type one
- <CR>, and MAX will put in all the necessary line-breaks in the
- previous paragraph.
-
- @Paragraph<Planned or Possible Modes>
-
- There are presently no other modes available. FORTRAN, BASIC, PASCAL
- and SCRIPT mode are in planning stage, other modes may follow as well.
- Hitting <TAB> in any of these modes will indent automatically, i.e. MAX
- will move your cursor where your language dictates it should be.
-
- @Subsection<Function Modes>
-
- @Paragraph<Auto Save Mode>
-
- Auto Save Mode will save your work after every 400 typed characters.
- It is not yet implemented.
-
- @Paragraph<Insert v Overstrike Mode>
-
- Insert Mode is the default mode.@index[Defaults] New characters will
- be inserted at the cursor position; everything behind the cursor
- position will be shifted to the right. Similarly, hitting a <CR> will
- insert a new line, and shift all other lines down. Insert Mode allows
- quicker editing than Overstrike mode, but requires a (short) time to
- get used to.
-
- Overstrike Mode works like an ordinary typewriter. New characters will
- replace ( overstrike ) the old characters. The advantage is that
- typists who are only used to typewriters, will already know how to use
- it. Overstrike Mode is not yet implemented.
-
- @Paragraph<Keep Mode>
-
- Keep Mode will force MAX to remember what you were editing when you
- exit. When you reenter MAX, MAX will look up what it was editing before,
- re-visit these files, and position the cursor where it was before.
- This can be quite useful if you are working on a big project, changing
- one little part, recompiling, changing again, and so on. Keep Mode is
- not yet implemented.
-
- @Section<Explanation of Commands by Subject>
-
- @Subsection<Using the Built-In Menu>
-
- Please refer to the section on keyboard usage. @index[Menus]
- @index[Last Line on Screen]
-
- @Subsection<Getting HELP>
-
- @Begin<Description>
-
- @index[CTL-_]CTL-_@\will enter the built-in on-line HELP menu. A
- number (not a function key!) will select another node, delete will
- retreat to the last node, @index[ESC, as used in HELP]<ESCAPE>,
- @index[SPACE, as used in HELP] <SPACE> or @index[CTL-G]<CTL-G> will
- abort the HELP menu, and return to your work. If @index[CTL-_]CTL-_
- doesn't work, try @index[CTL-G]CTL-G @index[CTL-_]CTL-_. If this
- doesn't work, start praying. @index[HELP] @index[Menus]
- @index[Aborting]
- @index[QUIT]
-
- @End<Description>
-
- @Subsection<Aborting with QUIT>
-
- @Begin<Description>
-
- @index[CTL-G]CTL-G@\will abort any function and return you to the main
- editing mode. You can then ask for help, exit the editor,
- etc.@index[Aborting] @index[QUIT]
-
- @End<Description>
-
- @Subsection<Moving the cursor>
-
- MAX offers cursor movements by character, line, word, sentence,
- paragraph, page, screen and file.
-
- @Begin<Description>
-
- Character@\@index[CTL-F]CTL-F@\will advance the cursor to the next
- character (@i<Forward>). If you are at the end of a line, the cursor
- will move to the start of the next line. If you are at the end of the
- file, @index[CTL-F]CTL-F will cause an error.@index[Cursor Right]
-
- @\@index[CTL-B]CTL-B@\will retreat by one character (@i<Backward>). If
- you are at the start of a line,the cursor will move to the last
- character of the previous line. If you are at the start of the file,
- @index[CTL-B]CTL-B will cause an error.@index[Cursor Left]
-
- Line@\@index[CTL-N]CTL-N@\will move the cursor to the next line
- (@index[Cursor Down]@i<Down>). MAX will to move the cursor to the
- same column. If the next line is shorter than the old line, MAX will
- place the cursor at the end of this line. If you type directly
- afterwards another @index[CTL-N]CTL-N ( or @index[CTL-P] CTL-P ), MAX
- will try to move to the original column (where your first CTL-N or
- CTL-P started). If you don't understand this, move the cursor to the
- end of the second-longest line in your text, and type a few
- @index[CTL-N]CTL-N.@*Typing @index[CTL-N]CTL-N on the last line
- generates an error.
-
- @\@index[CTL-P]CTL-P@\will move the cursor to the previous line
- (@index[Cursor Up]@i<Up>). Like @index[CTL-N]CTL-N, MAX will go to
- the same column on the next line, or any line thereafter. Typing
- @index[CTL-P]CTL-P on the first line will generate an error.
-
- Word@\@index[ESC-B]ESC-B@\will move the cursor to the start of the
- previous word. A word starts after a <SPACE>, or on a new line, with a
- non-<SPACE> character. @index[ESC-B]ESC-B on the first word of the
- file generates an error.
-
- @\@index[ESC-F]ESC-F@\will move the cursor to the start of the next
- word1. @index[ESC-F]ESC-F on the last word of a file is illegal.
-
- Paragraph@\@index<ESC-]>ESC-]@\will move the cursor to the start of
- the next paragraph. A paragraph is text that begins after an empty
- line. @index[ESC-[]ESC-[ in the first paragraph will generate an
- error. NOT IMPLEMENTED: USE @index[CTL-R CTL-Q CTL-M CTL-Q CTL-J]
- CTL-R CTL-Q CTL-M CTL-Q.
-
- @index[Paragraph]
-
- @\@index[ESC-[]ESC-[@\will move the cursor to the start of the
- previous paragraph. @index[ESC-[]ESC-[ at the last paragraph will
- generate an error. NOT IMPLEMENTED: USE @index[CTL-S CTL-Q CTL-M
- CTL-Q CTL-J] CTL-S CTL-Q CTL-M CTL-Q CTL-J. @index[Paragraph]
-
- Page@\@index<CTL-X ]> CTL-X ]@\will move the cursor to the previous ^L
- in the text. NOT IMPLEMENTED: USE @index[CTL-R CTL-Q CTL-L] CTL-R
- CTL-Q CTL-L.
-
- @\@index[CTL-X []CTL-X [@\will move the cursor to the next ^L in the
- text. NOT IMPLEMENTED: USE @index[CTL-S CTL-Q CTL-L] CTL-S CTL-Q
- CTL-L.
-
- Screen@\@index[CTL-V]CTL-V@\will move the cursor to the start of the
- next screen, and update to a new screen. If you are less than a
- screenful away from the end of the file, @index[ESC-V]ESC-V will
- generate an error.
-
- @\@index[ESC-V]ESC-V@\will move the cursor to the start of the
- previous screen, and update to a new screen. If you are less than a
- screenful away from the start of the file, a warning message will be
- displayed. @index[Messages]
-
- File@\@index[ESC->]ESC->@\will move the cursor to the end of your file.
- @index[Cursor End]
-
- @\@index[ESC-<]ESC-<@\will move the cursor to the start of your
- file.@index[Cursor Home]
-
- @\@index[CTL-L]CTL-L@\will redraw the screen with a centered cursor.
- An argument to @index[CTL-L]CTL-L allows to specify on which screen
- line the cursor should appear on. @index[CTL-L]CTL-L does not really
- move the cursor, but it allows you to see it from a "different
- angle."@index[Arguments to CTL-L]
-
- Others@\@index[CTL-X CTL-X]CTL-X CTL-X@\will exchange cursor and mark. The
- cursor will be moved to the position where your mark was, the mark
- will be moved to the old cursor position. This comes in very handy to
- check the boundaries of your region.
-
- @End<Description>
-
- @Subsection<Deleting, Killing, Moving Text>
-
- There are two different ways of erasing text. Deleting will simply
- throw away text. Killing will save the erased text in the @index[Yank
- Buffer] Yank-Back Buffer , and allow you to put it back into your file
- at any location. In MAX, killing allows you to delete, move or copy
- lines, words, or even blocks of text.@index[Region] The idea is always
- the same: you kill some of your text, and yank it back elsewhere. To
- erase text, simply do not use @index[CTL-Y] CTL-Y; to move text, go to
- the place where you want to move your text to, and use
- @index[CTL-Y]CTL-Y; to copy text to new location(s), do
- @index[CTL-Y]CTL-Y directly after your @index[CTL-K]CTL-K to place the
- killed text back to its original place. Now you have a copy of the
- text to copy in your yankback buffer. Move your cursor to the new
- location(s), and type @index[CTL-Y]CTL-Y again. Voi-la.
- @index[Killing]
-
- Since there is only one yank-back buffer, be careful with new killing.
- Doing another kill will probably erase your previous yank-back buffer,
- loosing whatever you killed before. There will be no way to regain the
- old killed text. In some future version, there might be more than one
- buffer, but for the time being you will have to live with
- one.@index[Yank Buffer]
-
- @BEGIN<DESCRIPTION>
-
- @index[CTL-D]CTL-D@\will delete the character at the cursor position.
- It can also be used to delete empty lines, or to merge two consecutive
- lines. @index[CTL-D]CTL-D is illegal at the end of the file.
-
- @index[CTL-H]CTL-H@\(Backspace) will rubout the last character, i.e.
- the character directly before the cursor position. This is useful for
- correcting text "on the run," like typos. @index[CTL-H]CTL-H is
- essentially the same as @index[CTL-B]CTL-B @index[CTL-D]CTL-D.
- @index[BACKSPACE] <BACKSPACE>, as CTL-H is often called, on the start
- of the file is illegal. Note that @index[CTL-H]CTL-H assumes the
- function of EMACS' <DEL>.@index[DEL, to "backspace"] @index[EMACS]
-
- All of the following functions will kill text, i.e. place the erased
- text into the yankback buffer. @index[Killing]
-
- @index[ESC-D]ESC-D@\will kill the word to the right.
- @index[ESC-D]ESC-D at the end of the file is illegal.
-
- ESC-BS@\will kill the word to the left. ESC-BS at the start of the
- file is illegal. @index[ESC-BS] @index[ESC-DEL]
-
- @index[CTL-W]CTL-W@\will kill the region. The region is defined
- dynamically as all text between the cursor and the mark. (Marks can
- be set with @index[CTL-@@]CTL-@@.)@index[Mark(ing the Region)]
- @Index[Region] @index[blocks] Region commands are used to delete, move
- or copy entire blocks of text. It is recommended that you use
- @index[CTL-X CTL-X]CTL-X CTL-X to check the static boundaries of your
- region before actually using @index[CTL-W]CTL-W. This is because both
- mark and cursor change continuously during your editing session while
- you insert or delete text.
-
- @index[CTL-K]CTL-K@\will kill everything from the cursor to the end of
- the line. If you are on an empty line, the line will be closed.
- @index[CTL-K] CTL-K is the most widely used command to quickly kill or
- move text. @index[CTL-K] @u{CTL-K is exceptional in so far, as
- directly consecutive (and only directly consecutive) CTL-Ks do not
- replace the text in the yank-back buffer, but add to it.} @index[Yank
- Buffer]
-
- @index[ESC-K] ESC-K@\allows adding text via @index[CTL-K]CTL-K to the
- yank buffer after you have issued some commands other than
- @index[CTL-K]CTL-K ( which usually means your yank-back buffer is
- closed ).
-
- @index[CTL-Y]CTL-Y@\will yank back the last killed object at the
- cursor position. You can yank-back the same object a few times,
- creating multiple copies of text at multiple places.
-
- @End<Description>
-
- @Subsection<Searching and/or Replacing Text>
-
- MAX's search is incremental, i.e. text is already searched while you
- are entering your search string or commands. Among the commands are
- the options to search for control-characters, to reverse the search
- direction, or to include a wildcard character. The search is always
- not case-sensitive ! @index[Case Sensitivity]@index[Wildcard Character]
-
- @Begin<Description>
-
- @index[CTL-S]CTL-S@\will search for a string while you enter it.
-
- @index[CTL-R]CTL-R@\will search backward ( @i[reverse] ).
-
- @i<Subcommands>@\@index[CTL-Q]CTL-Q@\will quote a character. This
- allows searching for control characters in your text ( e.g. CTL-Q
- CTL-L will look for a ^L in your document ).
-
- @\@index[CTL-G]CTL-G@\will abort the search (NOT IMPLEMENTED: and
- place your cursor where you started your search ).@index[Aborting]
- @index[QUIT]
-
- @\@index[CTL-S]CTL-S@\If you are searching in reverse direction, a
- @index[CTL-S] CTL-S will change the search direction. If you just
- started a search with @index[CTL-S]CTL-S, another @index[CTL-S]CTL-S
- will search for nother occurance of the same string.
-
- @\@index[CTL-R]CTL-R@\Analogous to @index[CTL-S]CTL-S, but reverse.
-
- @\@index[CTL-J]CTL-J@\will match any character ( @i[wildcard] ).
- @index[Wildcard Character] For instance, @index[CTL-S]CTL-S A
- @index[CTL-J]CTL-J B will find AAB, ABB, ACB, etc.
-
- @\Other commands will abort the search, and interprete the command as
- a normal MAX command. A good way to end a search is
- @index[CTL-L]CTL-L, which will abort the search and simply redraw the
- screen.@index[Aborting] @index[QUIT]
-
- @\@index[ESC-X S]ESC-X S@\"Search and Replace" @index[Search and
- Replace] will search for all occurences of string 1 after the cursor
- position, and replace it with string 2. Note that string 1 is not
- case-sensitive, so all occurances of string 1, no matter whether in
- lower or uppercase, will be replaced. ESC-X S will first prompt you
- for string 1, which may contain @index[CTL-J]CTL-Js ( the wildcard
- character ). Then it will prompt you for string 2. This command may
- take some time, so please be patient. @index[Case Sensitivity]
-
- @\@index[ESC-X Q]ESC-X Q@\"Query Search and Replace," @index[Query
- Search and Replace] similar to "Search and Replace," but asks for
- confirmation at each occurrence of string 1. Hitting <SPACE>
- @index[SPACE, as used in Query Replace] will substitute string 2,
- <DEL> @index[DEL, to overskip in Query Replace] will skip the
- substitution, and @index[CTL-G] CTL-G will abort.@index[Aborting]
- @index[ESC-X Query Search And Replace$] @index[QUIT]
- @index[Confirmations]
-
- @End<Description>
-
- @Subsection<Using Macros>
-
- Macros are a powerful way to customize your editor, and to avoid
- entering common keystroke sequences repeatedly.
-
- @BEGIN<Description>
-
- @index[CTL-X (]CTL-X (@\will start the macro definition. Every
- character you type hereafter will be recorded until you stop the
- definition, or cause an error, or overflow the macro-buffer ( 255
- characters ). Note that @i<DEF> @index[DEF, displayed on the
- Modeline] appears on the modeline, reminding you that you are defining
- a macro. @index[Macro Buffer] @index[Macros]
-
- @index[CTL-X )]CTL-X )@\will stop the macro definition. The @i<DEF>
- on the modeline will disappear, and you can now invoke your macro.
-
- @index[CTL-X E]CTL-X E@\will invoke the macro. Every character that
- you typed during the definition will be "played back," just as if you
- typed it. When MAX detects an error, it will automatically stop the
- macroinvocation. For instance, if you are at the second to last
- character in the file, and your macro does @index[CTL-K]CTL-K
- @index[CTL-D]CTL-D HELLO, MAX would detect an error executing
- @index[CTL-D]CTL-D, and abort the macro, never actually inserting
- HELLO.@index[Aborting] @index[Error Messages] @index[Messages]
- @index[QUIT]
-
- @\A powerful feature of MAX are arguments to macros. @index[Arguments
- to Macros] For example, you could give simulate @i[search and replace]
- by defining a macro that will search for a string, then rubout the
- string, and insert another. Finally you could invoke this macro with
- @index[CTL-n] CTL-50000 @index[CTL-X E] CTL-X E. MAX replaces until
- there are no more occurrences, or until it reaches 50,000
- replacements. Some macro invocations can take quite long.
- @index[CTL-G]CTL-G will interrupt macroexecutions. @index[Macros]
-
- @End<Description>
-
- @Subsection<Using Buffers and Windows>
-
- MAX allows you to edit several files, or multiple copies of the same
- file during one session without exiting or saving to disk.
-
- Each buffer @index[Buffers] holds one file (maximum 64K),@index[64K
- Limit] just like a pad may have several @Faecher. Only one buffer can
- be active at a time, i.e. you can only edit the currently active
- buffer ( just like you can only open one page in your pad ). A good
- example for using buffers would be writing a letter in one document,
- and the envelope in another.@index[Buffer Space Limit]
-
- There is basically only one operation with buffers, namely switching
- to it. The new buffer will be selected (becomes active), the
- previously active buffer becomes passive.
-
- @BEgin<Description>
-
- @index[CTL-X B]CTL-X B@\will display a menu of available
- buffers,@index[Buffers] and prompt you for the new buffer. MAX
- expects a number within the range of available buffers, and will
- activate this buffer. @index[CTL-G]CTL-G aborts the
- selection.@index[Aborting] @index[Menus] @index[QUIT]
-
- @index[CTL-X CTL-B]CTL-X CTL-B@\will switch to the buffer that was
- active immediately before the currently active buffer. It is a
- convenient way to quickly toggle between two buffers.
-
- @End<Description>
-
- Each buffer can hold a file with up to 64KB of text.@index[64K Limit]
- @index[Buffer Space Limit] When you start MAX, MAX will load buffers
- with their default files, and activate buffer 1. Presently, WORK.TXT
- @index[WORK.TXT] is default in buffer 1 and 2; other buffers do not
- load default files.@index[Defaults]
-
- A window is the place on the screen that your buffer is displayed on.
- Sometimes it is convenient to see one buffer, while really working on
- another. This is called split editing. Think of a window as reminders
- in a pad that allow you to really see two @Faecher (buffers) at the
- same time. You can have two windows, each of which can hold its own
- index[Buffers], or the same buffer. You can arrange them as follows:
-
- @Begin<Verbatim>
-
- /-------------\ /-------------\ /-------------\
- | | | | | Window 1 |
- | Window 1 | | Window 2 | |---------------|
- | | | | | Window 2 |
- \-------------/ \-------------/ \-------------/
-
- @End<Verbatim>
-
- Apparently you could also toggle buffers to achieve the same result as
- the two first figures. The real interesting gain from buffers is
- sketched in figure three: Your cursor is in one of those windows, and
- editing just as normal, but uses only half the screen. The other
- window remains statically unchanged, allowing you to look at it.
-
- You want to be able to switch the cursor from one window to the other,
- to split up the screen into two windows, and to go back to one-window
- mode.
-
- @BEgin<Description>
-
- CTL-X 1@\will toggle the number of windows concurrently on the screen
- ( one or two ).@index[CTL-X 1]
-
- CTL-X 2@\identical with CTL-X 1.@index[CTL-X 2]
-
- CTL-X O@\will toggle active and passive window. The cursor will move
- into the new active window. If this window is not on the screen, the
- previous window will disappear and the new window will overlay the old
- window.@index[CTL-X O]
-
- @End<Description>
-
- @Subsection<Saving, Loading and Exiting>
-
- @Begin<Description>
-
- CTL-X CTL-S@\@b<s>aves the contents of the active index[Buffers] under
- its old name to disk, and marks the buffer "unmodified." An
- unmodified buffer does not display a "*" ("dirty") as the first
- character on the modeline.@index[Dirty, see "Modified"] @index["*" (to
- mark modified buffers)] @index[CTL-X CTL-S] @index [Modified Buffer]
- @index[Unmodified Buffer] @index[Modified Buffer] @Index[Saving a
- Buffer to Disk] @Index[Disk, writing to and reading from disk]
-
- CTL-X CTL-W@\allows the contents of the active index[Buffers] to be
- @b<w>ritten to a new file on disk, thus preserving the contents of the
- old file. The new name becomes the default for all further CTL-X
- CTL-S. CTL-X CTL-W will prompt you for the new filename ( Escape
- recognition will work! ).@index[CTL-X CTL-W] @index[Writing a Buffer
- to Disk] @index[Defaults]
-
- CTL-X CTL-V@\will @b<v>isit a file from disk in the current buffer. It
- will prompt you for the name of a file. If no such file exists, only
- the name is noted ( for further CTL-X CTL-S ). In this case, a "[NEW
- FILE]" message will appear on the screen.@index{[NEW FILE]}
- @index[Messages] If the file exists, you can attempt to use <ESC> to
- complete unique filenames,@Index[Filenames] but only if these files
- are in the currently connected directory. If there is more than one
- file available to match the input up to this point, a beep will sound.
- If there is no such file at all, CTL-X CTL-V will
- abort.@index[Aborting] @index[QUIT] If only one such file exists, the
- rest of the name will be filled in at the promptline. You can now
- press <RETURN> to load this file. CTL-X CTL-V will return an error if
- the file is longer than 63K ( which virtually no normally used file
- will exceed. Longer applications are usually realized with separate
- compilations or similar facilities. The 64K limit is enforced to use
- the 8088s' power to the largest possible extent ).@index[Segment
- Limits, see also 64K Limit] @index[Buffer Space Limit] @index[Escape
- Recognition] @index[CTL-X CTL-V] @index[64K Limit] @index[Visiting a
- File]
-
- CTL-X CTL-Z@\will exit to DOS after additional confirmation ( CTL-Y ).
- @index[Aborting] @index[QUIT] @index[DOS] @index[Confirmations]
- @index[CTL-X CTL-Z] @index[CTL-Y as Confirmation] @index[QUIT]
-
- @End<Description>
-
- @Subsection<Using other built-in functions>
-
- Following is a listing of commands which have not yet been discussed,
- some of which can not be found in the standard DEC-20 EMACS
- @index[EMACS] implementation.
-
- @Begin<Description>
-
- CTL-X D@\will prompt for a directory mask, and display the DOS directory
- of files on the disk.@index[Directory]@Index[DOS]@index[CTL-X CTL-D]
- @index[ CTL-X D]
-
- CTL-Z@\will scroll the screen up by one line.@index[CTL-Z]
- @index[Scrolling]
-
- ESC-Z@\will scroll down the screen by one line.@index[ESC-Z] This and
- the above function can be conveniently accessed by CTL-PgUP and
- CTL-PgDn.@index[CTL-PgUp] @index[CTL-PgDn]
-
- ESC-Q@\will fill the paragraph, which means it will break all lines in
- the current paragraph which are longer than the fillcolumn, s.t. they
- are as long as permitted. Lines that are short enough to hold more
- words are merged with the next line. Words will never be broken up.
- @index[Fill Paragraph] @index[Linebreaking] @index[Fill Column]
- @index[Paragraph]
-
- CTL-X F@\allows setting the fill column using an argument. ESC-70
- CTL-X F will set the maximum length of a line on a fill to 70.
- @index[CTL-X F] @index[Fill Column] @index[Arguments to CTL-X F]
-
- ESC-U@\@index[ESC-U] will uppercase the previous word ( i.e. convert
- all its characters to uppercase ).@index[Uppercasing a Word]
-
- ESC-C@\@index[ESC-C] will capitalize the previous work ( i.e. convert
- the first letter to uppercase, and all others to lowercase ).
- @index[Capitalizing a Word]
-
- Arguments@\Most functions accept arguments. An argument usually means
- that a command is repeated n times. To give an argument, use <ESC>-n
- or CTL-U n ( the two are equivalent ) where n is a number, and then
- simply issue the command. For example, CTL-U 10 CTL-N will move down
- 10 lines.@index[Arguments]
-
- @\Some functions interpret arguments differently. Two commands come to
- mind: CTL-L, CTL-Q and CTL-X F. An argument to CTL-L will center the
- cursor on line n on the screen; an argument to CTL-Q will allow you to
- insert n controlcharacters without typing CTL-q in front of each; an
- argument to CTL-X F will set the fillcolumn. @index[CTL-l]
- @indEx[Arguments to CTL-L] @Index[CTL-L] @Index[Arguments to CTL-L]
- @index[Arguments] @index[CTL-U] @Index[ESC-n<umber>] @index[Literal
- Mode] @index[CTL-X F] @index[Arguments to CTL-X F] @index[Fill Column]
- @index[ESC-Q]
-
- CTL-X CTL-_@\will create a cross-reference of a valid help-file which
- is in the active buffer @index[Buffers], and dump it into the previous
- buffer. @b<Please note that MAX will crash if you attempt to run this
- function without a valid help-file ! In particular, make sure that
- nodenames are properly terminated.> @index[HELP file] @index[Indexing
- a Help File] @index[CTL-X CTL-_] @index[Cross Reference of a Help
- File] @Index[Crashes, because of CTL-X CTL-_]
-
- @End<Description>
-
- @Subsection<Explanation of Commands by Keystroke>
-
- Please refer to the index.
-
- @Section<Some Differrences of MAX and EMACS> @index[EMACS]
-
- @Tabset<20>
- @Begin<Description>
-
- Default Files:@\On startup, MAX will attempt to load the first two
- files which are specified at the DOS command line into buffers #1 and
- #2. If no file was specified, MAX will load the file WORK.TXT into the
- first two buffers @index[Buffers]. Buffers #3 to #7 will always be
- initialized to ( but not loaded with ) the filename
- FOO.BAR.@index[Default Files] @index[Defaults] @index[DOS]
- @index[WORK.TXT]
-
- Messages:@\After loading, MAX will display the number of buffers, the
- space free for holding killed text,@Footnote[The number of buffers and
- the free space for killed text is determined by all free memory above
- the program] and a message indicating whether it could load a file.
- Note that for two new files in buffers 1 and 2 you should get two
- @i{[NEW FILE]} messages. Loading one file into one buffer
- @index[Buffers], but none into the other will still give you one
- initial @i{[NEW FILE]} message. @Index[Messages] @index{[NEW FILE]}
- @index[Kill Space] @index[Buffers, Number Of Available Buffers]
- @index[Memory Usage] @index[RAM Usage]
-
- Mark:@\On startup, MAX will set the mark on the first character of the
- file.@index[Mark(ing the Region)]@index[Region]
-
- Exit:@\Since forks are not kept ( or in UNIX terms: "pids are not
- stopped" ), MAX asks for confirmation (CTL-Y) before exiting to
- DOS.@index[Confirmations] @Index[CTL-Y as Confirmation] @index[DOS]
-
- Escape Recognition:@\Hitting <ESC> when MAX prompts you for a filename
- will force MAX to attempt completing it. Note that this can only be
- done if the filename is unique, and never for a directory-name !
- @index[Escape Recognition] @index[ESC, as used in filename completion]
- @index[Filenames] @index[DOS] @index[Uniqueness of Filenames (for
- Escape Recognition)]
-
- Find File:@\Find File is unfortunately not yet implemented.@index[Find
- File] @index[CTL-X CTL-F]
-
- Buffer Space:@\Buffer Space is restricted to 64K.@index[Buffer Space
- Limit] @Index[64K Limit]
-
- Buffer Switching:@\CTL-X B will prompt a menu of available buffers,
- and allow you to choose one by typing a number. CTL-X CTL-B will
- switch previous and current buffer in the current window. @index[CTL-X
- B] @index[CTL-X CTL-B] @index[Buffers, Toggling Buffers, see also
- CTL-X CTL-B] @index[Menus]
-
- Windows:@\Only two windows are permitted. C-X 1 or CTL-X 2 toggles
- windows.@index[Windows, Toggling Windows, see also CTL-X 1 or CTL-X 2]
- @index[CTL-X 1]
- @index[CTL-X 2]
-
- Lastline:@\MAX offers both EMACS-like @index[EMACS] commands and
- menu-entry. The menu system will appear on the bottom of the screen.
- Pressing the key will result in the corresponding action being taken.
- By my convention, choices leading to other menus are uppercased, while
- editor commands are lowercased.@index[Menus] @index[Uppercase, as used
- in Menus] @index[Last Line on Screen] Modeline:@\The modeline
- constantly updates date and time. @index[Modeline] @index[Date,
- displayed on the Modeline] @index[Time, displayed on the Modeline]
-
- Messages@\Messages generally stay on the screen for about 15 seconds (
- unless new messages appear ). Error messages are usually in reverse
- video.@index[Messages] @index[Error Messages]
-
- @skip<2>
-
- Help:@\The help menu is actually a finite state language interpreter.
- The file MAX.HLP ( which must be either in the connected directory or
- in \MAX\DOC ) is interpreted as a menu, and action can be taken by the
- user to slide down the graph. Nodes are diskaddresses, and therefore
- one has to carefully adjust new diskaddresses after modifying the help
- menu ( use MAX to do so ! ). There is a built-in function ( CTL-X
- CTL-_ ) which will calculate the new diskaddresses of all nodes, and
- report it to the other buffer ( but may crash the editor upon
- syntactically invalid help files ). This function makes modifying the
- help menu considerably easier. MAX searches for its help file first
- in the connected directory and then in \MAX\DOC. MAX does not expect
- functionkeys, but numbers as choices! DEL will retreat to the previous
- node, ESC, SPACE or CTL-G will abort.@index[SPACE, as used in HELP]
- @index[Aborting] @index[QUIT] Please refer to the section on Help in
- this manual.@index[HELP] @index[CTL-X CTL-_] @index[MAX.HLP]
- @index[MAX\DOC] @index[Diskaddresses, as used in HELP] @index[Finite
- State HELP Language] @index[Default Directories] @index[Defaults]
- @index[DOS] @Index[Crashes, because of CTL-X CTL-_] @index[DEL, to
- abort HELP] @index[Numbers, as used to select HELP options]
- @index[Options, as used in Help] @index[ESC, as used in HELP]
- @index[SPACE, as used in HELP] @index[Cross Reference of a Help File]
- @index[Help] @index[Menus]
-
- Macros:@\The execution of a macro will not turn off display updating.
- One can see the macro working. The advantage is that one can simply
- stop a macro with a long argument at any chosen time using CTL-G. The
- disadvantage is a 2% loss of speed.@index[Macros]
-
- Search & Replace:@\Search and Replace is invoked by ESC-X S, Query
- Search and Replace by ESC-X Q.@index[Search and Replace] @index[ESC-X
- Search and Replace$] Please refer to the proper section of this
- manual.
-
- Fill:@\Fill will not take an argument to justify.@index[Fill
- Paragraph] @index[CTL-X F] @index[ESC-Q]
-
- Scrolling:@\CTL-Z and ESC-Z will scroll the display one line up or
- down.@index[CTL-Z] @index[ESC-Z] @index[Scrolling]
-
- @skip<3>
- Bugs:@\Some minor bugs have appeared, none of them fatal. Most
- disappear from the screen immediately after simple and obvious
- corrective action is taken.@index[Bugs]
-
- @End<Description>
-
- MAX, Copyright (C) Ivo Welch, Jan. 1985.
-
- @Chapter<Advanced Topics>
-
- @Section<How to modify the Editor Help Menu>
-
- @Section<About the Internal Structure of the Editor>
-
- @Subsection<Easy Customization>
-
- Please look at DEFS.H to modify certain standard definitions (i.e.
- last-line displayed on power up, display used, original macro,
- original file names to be loaded etc.).
-
- @Subsection<Major Datastructures>
-
- BCB stands for Buffer Control Block, and is located in the first 256
- bytes of each Buffer. Its definition can be found in DEFS.H. Among the
- more important fields of the BCB is the cursor position, the position
- of the cursor on the screen, the mark, the FCB that allows saving or
- loading the buffer to disk, etc. As an example, to set the cursor to
- the start of the buffer, use the command:
-
- mov DS:BCB.FCursor, 100h
-
- where DS is the 64K segment that holds our buffer, BCB the structure
- definition, and FCursor the address of the cursor in the field.
-
- @Subsection<The Function Jump Tables>
-
- @Subsection<The Screen Definition>
-
- Please fgrep for SCR if you wish to find out points where I have to
- write to the screen.
-
- @Subsection<The OS interface>
-
- @Subsection<Ading a New Function>
-
- @Paragraph<Error Trapping>
-
- If an error should be displayed, DX should be set to the offset of an
- ascii string, CX should contain its length. Control should be
- transferred to .Error0, which will reset stack, macro and other
- pointers to their original state at invocation, display the
- errormessage, and sound a beep.@index[Error Messages] @index[Messages]